/*
 * Node.cpp
 *
 *  Created on: 23/05/2010
 *      Author: prodrig
 */

#include "Node.h"

Node::Node(ICollectible* elem) {
	element = elem;
	next = 0;
}

void Node::setNext(Node *node) {
	next = node;
}

Node *Node::getNext() {
	return next;
}

bool Node::hasNext() {
	return next != 0;
}

ICollectible *Node::getElement() {
	return element;
}

Node::~Node() {
	if (next != 0)
		delete next;
}
